home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmMain
- BorderStyle = 3 'Fixed Dialog
- Caption = "Live Text VB Example"
- ClientHeight = 5475
- ClientLeft = 1140
- ClientTop = 1515
- ClientWidth = 5745
- Height = 5880
- Icon = "LText.frx":0000
- Left = 1080
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5475
- ScaleWidth = 5745
- ShowInTaskbar = 0 'False
- Top = 1170
- Width = 5865
- Begin VB.Frame Frame1
- Caption = "Live Text Control"
- Height = 4515
- Left = 45
- TabIndex = 0
- Top = 945
- Width = 5685
- Begin VB.ComboBox cboLiveTextDirection
- Height = 315
- ItemData = "LText.frx":08CA
- Left = 135
- List = "LText.frx":08DD
- Style = 2 'Dropdown List
- TabIndex = 19
- Top = 1935
- Width = 1455
- End
- Begin VB.Timer Timer1
- Interval = 3000
- Left = 3915
- Top = 225
- End
- Begin VB.CheckBox chkLiveTextActive
- Caption = "&Active"
- Height = 240
- Left = 135
- TabIndex = 13
- Top = 270
- Value = 1 'Checked
- Width = 1590
- End
- Begin VB.CommandButton cmdLiveTextColor
- Caption = "&Label Color"
- Height = 375
- Left = 4410
- TabIndex = 12
- Top = 225
- Width = 1185
- End
- Begin VB.CommandButton cmdBorderColor
- Caption = "&Border Color"
- Height = 375
- Left = 4410
- TabIndex = 11
- Top = 630
- Width = 1185
- End
- Begin VB.CommandButton cmdTextColor
- Caption = "Text C&olor"
- Height = 375
- Left = 4410
- TabIndex = 10
- Top = 1035
- Width = 1185
- End
- Begin VB.CheckBox chkLiveTextChanged
- Caption = "Text &Changed Sound"
- Height = 240
- Left = 135
- TabIndex = 9
- Top = 585
- Value = 1 'Checked
- Width = 1950
- End
- Begin VB.CheckBox chkLiveTextChanging
- Caption = "Text C&hanging Sound"
- Height = 240
- Left = 135
- TabIndex = 8
- Top = 900
- Value = 1 'Checked
- Width = 2310
- End
- Begin VB.ComboBox cboBorderWidth
- Height = 315
- ItemData = "LText.frx":091A
- Left = 135
- List = "LText.frx":0930
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 7
- Top = 2565
- Width = 1455
- End
- Begin VB.ComboBox cboSpeed
- Height = 315
- ItemData = "LText.frx":0946
- Left = 1665
- List = "LText.frx":0959
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 6
- Top = 1935
- Width = 1005
- End
- Begin VB.CommandButton cmdExit
- Caption = "E&xit"
- Height = 330
- Left = 4455
- TabIndex = 5
- Top = 4095
- Width = 1140
- End
- Begin VB.ComboBox cboFont
- Height = 315
- ItemData = "LText.frx":096C
- Left = 1665
- List = "LText.frx":0973
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 4
- Top = 2565
- Width = 2130
- End
- Begin VB.TextBox txtMessage
- Height = 330
- Left = 180
- MaxLength = 50
- TabIndex = 3
- Text = "Live Text Control"
- Top = 4095
- Width = 3615
- End
- Begin VB.CommandButton cmdApply
- Caption = "&Apply"
- Height = 330
- Left = 2970
- TabIndex = 2
- Top = 3735
- Width = 825
- End
- Begin VB.ComboBox cboDelay
- Height = 315
- ItemData = "LText.frx":0986
- Left = 2745
- List = "LText.frx":099F
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 1935
- Width = 1050
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "Text Direction"
- Height = 195
- Left = 135
- TabIndex = 20
- Top = 1710
- Width = 990
- End
- Begin MSComDlg.CommonDialog dlgMain
- Left = 3375
- Top = 180
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327681
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Border Width"
- Height = 195
- Left = 135
- TabIndex = 18
- Top = 2340
- Width = 930
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "Text Speed"
- Height = 195
- Left = 1665
- TabIndex = 17
- Top = 1710
- Width = 825
- End
- Begin VB.Label Label5
- AutoSize = -1 'True
- Caption = "Font"
- Height = 195
- Left = 1665
- TabIndex = 16
- Top = 2340
- Width = 315
- End
- Begin VB.Label Label6
- AutoSize = -1 'True
- Caption = "Message"
- Height = 195
- Left = 180
- TabIndex = 15
- Top = 3870
- Width = 645
- End
- Begin VB.Label Label7
- AutoSize = -1 'True
- Caption = "Text Delay"
- Height = 195
- Left = 2745
- TabIndex = 14
- Top = 1710
- Width = 765
- End
- End
- Begin LiveLabelsLib.LiveText LiveText1
- Height = 780
- Left = 45
- TabIndex = 21
- Top = 90
- Width = 4380
- _Version = 65536
- _ExtentX = 7726
- _ExtentY = 1376
- _StockProps = 8
- BorderWidth = 2
- Message = "Live Text"
- BeginProperty LiveTextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Comic Sans MS"
- Size = 24.01
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- BorderColor = 128
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cboBorderWidth_Click()
- LiveText1.BorderWidth = Val(cboBorderWidth.List(cboBorderWidth.ListIndex))
- End Sub
- Private Sub cboDelay_Click()
- LiveText1.LiveTextDelay = Val(cboDelay.List(cboDelay.ListIndex))
- End Sub
- Private Sub cboFont_Click()
- LiveText1.LiveTextFont.Name = cboFont.List(cboFont.ListIndex)
- End Sub
- Private Sub cboSpeed_Click()
- LiveText1.LiveTextSpeed = Val(cboSpeed.List(cboSpeed.ListIndex))
- End Sub
- Private Sub cboLiveTextDirection_Click()
- LiveText1.LiveTextDirection = cboLiveTextDirection.ListIndex
-
- End Sub
- Private Sub chkLiveTextActive_Click()
- Timer1.Enabled = (chkLiveTextActive.Value = 1)
- End Sub
- Private Sub chkLiveTextChanged_Click()
- With LiveText1
- If (chkLiveTextChanged.Value = 0) Then
- .SoundWhenChanged = ""
- Else
- .SoundWhenChanged = App.Path & "\" & "Tick.WAV"
- End If
- End With
- End Sub
- Private Sub chkLiveTextChanging_Click()
- With LiveText1
- If (chkLiveTextChanging.Value = 0) Then
- .SoundWhenChanging = ""
- Else
- .SoundWhenChanging = App.Path & "\" & "Tick.WAV"
- End If
- End With
- End Sub
- Private Sub cmdApply_Click()
- LiveText1.Message = txtMessage.Text
- End Sub
- Private Sub cmdBorderColor_Click()
- With dlgMain
- .Action = 3
- If .CancelError Then Exit Sub
- LiveText1.BorderColor = .Color
- End With
- End Sub
- Private Sub cmdExit_Click()
- Unload Me
- End Sub
- Private Sub cmdTextColor_Click()
- With dlgMain
- .Action = 3
- If .CancelError Then Exit Sub
- LiveText1.ForeColor = .Color
- End With
- End Sub
- Private Sub cmdLiveTextColor_Click()
- With dlgMain
- .Action = 3
- If .CancelError Then Exit Sub
- LiveText1.LiveTextColor = .Color
- End With
- End Sub
- Private Sub Form_Load()
- chkLiveTextChanged_Click
- chkLiveTextChanging_Click
- cboFont.ListIndex = 0
- cboLiveTextDirection.ListIndex = 1
- cboSpeed.ListIndex = 0
- cboDelay.ListIndex = 0
- cboBorderWidth.ListIndex = 2
- Dim Cnt As Long
- For Cnt = 0 To Screen.FontCount
- cboFont.AddItem Screen.Fonts(Cnt)
- Next
- End Sub
- Private Sub Timer1_Timer()
- Static Cnt As Long
- Cnt = Cnt + 1
- LiveText1.Message = "Live Text " & Cnt
- End Sub
-